<?php

    session_start();
    $_SESSION['username']="";
    $_SESSION['password']="";  
    unset($_SESSION['username']);
    unset($_SESSION['password']);   
    session_destroy();
	require_once('constants/lib_paths.php');
?>
<!DOCTYPE html>
<html>
<head>
    <title>Futura OS Login</title>
	<link rel="stylesheet" type="text/css" href="css/login.css" />
	<script src="js/adapter/jquery/jquery.js"></script>
	<script>
		$(function() {
			$("#info").show('slow');
		});
	</script>
</head>
<body>
	<div id="header">
		<form method="post" action="login.php">
			<label for="username">Username</label>
			<input type="text" name="username" class="finput" />
			<label for="password">Password</label>
			<input type="password" name="password" class="finput" />
			<input type="submit" name="btnSubmit" value="Login" class="fbutton" />
		</form>
	</div>
	<?php if(isset($_GET['logged']) && $_GET['logged'] == 'true'): ?>
	<div id="info">
		You have already signed in from a different location. Please sign out and then sign in again.
	</div>
	<?php endif; ?>
	<?php if(isset($_GET['status']) && $_GET['status'] == 'invalid'):	?>
	<div id="info">
		Invalid Username or Password
	</div>
	<?php endif ?>
	<?php if(isset($_GET['status']) && $_GET['status'] == 'logoff'):	?>
	<div id="info">
		You have been signed out
	</div>
	<?php endif ?>
	<?php if(isset($_GET['signup'])): ?>
	<div id="info">
		<?php
			if($_GET['signup'] == 'success')
				echo "Signup Successful !!";
			else
				echo "Signup Failed !!";
		?>
	</div>
	<?php endif ?>
	
	<div id="container">
		<div id="container2">
			<div id="sidebar">
				<h1>Futura</h1>
				<p>
					<b>Futura</b> is a web operating system that runs anywhere. You can manage your files,
					surf the web, run office applications, and have lots of fun.
					<b>Futura</b> - The Browser is all you need
				</p>
				<p>
					<a href="signup.php">
						<div class="signup">
							<h3>Signup</h3>
							Get your own shiny futura account here
						</div>
					</a>
				</p>
				<p>
					<a href="screenshots.php">
						<div class="signup">
							<h3>Screenshots</h3>
							View screenshots of Futura OS
						</div>
					</a>
				</p>
			</div>
			<div id="content">
				<img src="images/screenshots/desktop-screenshot.png" alt="screenshot" />
			</div>
			<div style="clear: both">
			</div>
		</div>
	</div>
	<div style="border-top: 1px solid #fff; height: 1px; margin: 0; padding: 0"></div>
</body>
</html>
